//
// Created by Administrator on 2016/11/29.
//

#ifndef PROJECT_LIGHT_H
#define PROJECT_LIGHT_H

#include "Object.h"

namespace ZainGL{
    class Light : public Object {
    public:
        float mAmbient;
        glm::vec4 mColor;
        glm::vec3 mFocuseOnPosition;

        glm::mat4 mLightVP;

        static GLuint ShadowFBO;
        static GLuint ShadowMapTextureLoc;

        virtual void beginRenderToShadowMap(int32_t width, int32_t height, GLuint shaderLoc);

        static void recreateShadowMap(GLuint width,GLuint height);

        void endRenderToShadowMap();

        virtual glm::mat4 getProjection(GLfloat d, GLfloat d1)=0;

        virtual glm::mat4 getViewMatrix()=0;
    };
}


#endif //PROJECT_LIGHT_H
